package com.qfedu.yige.controller;

import com.qfedu.yige.pojo.Card;
import com.qfedu.yige.pojo.CradUser;
import com.qfedu.yige.service.CardUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/userCard")
public class CardUserController {

    @Autowired
    private CardUserService cardUserService ;


    @GetMapping("/byUid")
    public List<CradUser> findCradUserByUid(@RequestParam("uid") Integer uid){
        List<CradUser> cardByUid = cardUserService.findCardByUid(uid);
        return cardByUid;
    }
}
